#ifndef _CORELSPYMEDIATOR_H_
#define _CORELSPYMEDIATOR_H_

#include <shlobj.h>
#include "CorelSymbolEngine.h"
#include "CorelStackTraceMgr.h"

class CCorelSpyMediator
{
public:
    CCorelSpyMediator(DWORD dwSpyEnableTlsIndex);
    virtual ~CCorelSpyMediator();

public:
    VOID Reset();

public:
    VOID EnableSpy(BOOL bEnable);
    BOOL IsSpyEnabled();

public:
    VOID Enter();
    VOID Leave();

public:
    CCorelSymbolEngine* GetSymbolEngine()
    {
        return &m_kSymbolEngine;
    }

    CCorelStackTraceMgr* GetStackTraceMgr()
    {
        return &m_kStackTraceMgr;
    }
    
private:
    CRITICAL_SECTION m_csLock;
    DWORD m_dwSpyEnableTlsIndex;

private:
    CCorelSymbolEngine  m_kSymbolEngine;
    CCorelStackTraceMgr m_kStackTraceMgr;
};

#endif // _CORELSPYMEDIATOR_H_